#ifndef __SCNS_BUFFER_H__
#define __SCNS_BUFFER_H__

#include "ScnsConfig.h"

#if defined(SCNS_BUFFER_ENABLE)&&SCNS_BUFFER_ENABLE==1

#include "ScnsYing.h"

extern void scnsBufferSetBool(uint8*buf,uint32 i,uint32 bi,uint32 l,uint8 d);
extern uint32 scnsBufferSetUint8(uint8*buf,uint32 i,uint32 l,uint8 d);
extern uint32 scnsBufferSetInt8(uint8*buf,uint32 i,uint32 l,int8 d);
extern uint32 scnsBufferSetUint16(uint8*buf,uint32 i,uint32 l,uint16 d);
extern uint32 scnsBufferSetInt16(uint8*buf,uint32 i,uint32 l,int16 d);
extern uint32 scnsBufferSetUint24(uint8*buf,uint32 i,uint32 l,uint32 d);
extern uint32 scnsBufferSetInt24(uint8*buf,int32 i,uint32 l,int32 d);
extern uint32 scnsBufferSetUint32(uint8*buf,uint32 i,uint32 l,uint32 d);
extern uint32 scnsBufferSetInt32(uint8*buf,uint32 i,uint32 l,int32 d);
extern uint32 scnsBufferSetUint64(uint8*buf,uint32 i,uint32 l,uint64 d);
extern uint32 scnsBufferSetInt64(uint8*buf,uint32 i,uint32 l,int64 d);
extern uint32 scnsBufferSetFloat16(uint8*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBufferSetFloat24(uint8*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBufferSetFloat(uint8*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBufferSetDouble(uint8*buf,uint32 i,uint32 l,double f);

extern uint8 scnsBufferGetBool(uint8*buf,uint32 i,uint32 bi,uint32 l);
extern uint8 scnsBufferGetUint8(const uint8*buf,uint32 i,uint32 l);
extern int8 scnsBufferGetInt8(const uint8*buf,uint32 i,uint32 l);
extern uint16 scnsBufferGetUint16(const uint8*buf,uint32 i,uint32 l);
extern int16 scnsBufferGetInt16(const uint8*buf,uint32 i,uint32 l);
extern uint32 scnsBufferGetUint24(const uint8*buf,uint32 i,uint32 l);
extern int32 scnsBufferGetInt24(const uint8*buf,uint32 i,uint32 l);
extern uint32 scnsBufferGetUint32(const uint8*buf,uint32 i,uint32 l);
extern int32 scnsBufferGetInt32(const uint8*buf,uint32 i,uint32 l);
extern uint64 scnsBufferGetUint64(const uint8*buf,uint32 i,uint32 l);
extern int64 scnsBufferGetInt64(const uint8*buf,uint32 i,uint32 l);
extern float scnsBufferGetFloat16(const uint8*buf,uint32 i,uint32 l);
extern float scnsBufferGetFloat24(const uint8*buf,uint32 i,uint32 l);
extern float scnsBufferGetFloat(const uint8*buf,uint32 i,uint32 l);
extern double scnsBufferGetDouble(const uint8*buf,uint32 i,uint32 l);

extern void scnsBuffer32SetBool(uint32*buf,uint32 i,uint32 bi,uint32 l,uint8 d);
extern uint32 scnsBuffer32SetUint8(uint32*buf,uint32 i,uint32 l,uint8 d);
extern uint32 scnsBuffer32SetInt8(uint32*buf,uint32 i,uint32 l,int8 d);
extern uint32 scnsBuffer32SetUint16(uint32*buf,uint32 i,uint32 l,uint16 d);
extern uint32 scnsBuffer32SetInt16(uint32*buf,uint32 i,uint32 l,int16 d);
extern uint32 scnsBuffer32SetUint24(uint32*buf,uint32 i,uint32 l,uint32 d);
extern uint32 scnsBuffer32SetInt24(uint32*buf,uint32 i,uint32 l,int32 d);
extern uint32 scnsBuffer32SetUint32(uint32*buf,uint32 i,uint32 l,uint32 d);
extern uint32 scnsBuffer32SetInt32(uint32*buf,uint32 i,uint32 l,int32 d);
extern uint32 scnsBuffer32SetUint64(uint32*buf,uint32 i,uint32 l,uint64 d);
extern uint32 scnsBuffer32SetInt64(uint32*buf,uint32 i,uint32 l,int64 d);
extern uint32 scnsBuffer32SetFloat16(uint32*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBuffer32SetFloat24(uint32*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBuffer32SetFloat(uint32*buf,uint32 i,uint32 l,float d);
extern uint32 scnsBuffer32SetDouble(uint32*buf,uint32 i,uint32 l,double f);

extern uint8 scnsBuffer32GetBool(uint32*buf,uint32 i,uint32 bi,uint32 l);
extern uint8 scnsBuffer32GetUint8(const uint32*buf,uint32 i,uint32 l);
extern int8 scnsBuffer32GetInt8(const uint32*buf,uint32 i,uint32 l);
extern uint16 scnsBuffer32GetUint16(const uint32*buf,uint32 i,uint32 l);
extern int16 scnsBuffer32GetInt16(const uint32*buf,uint32 i,uint32 l);
extern uint32 scnsBuffer32GetUint24(const uint32*buf,uint32 i,uint32 l);
extern int32 scnsBuffer32GetInt24(const uint32*buf,uint32 i,uint32 l);
extern uint32 scnsBuffer32GetUint32(const uint32*buf,uint32 i,uint32 l);
extern int32 scnsBuffer32GetInt32(const uint32*buf,uint32 i,uint32 l);
extern uint64 scnsBuffer32GetUint64(const uint32*buf,uint32 i,uint32 l);
extern int64 scnsBuffer32GetInt64(const uint32*buf,uint32 i,uint32 l);
extern float scnsBuffer32GetFloat16(const uint32*buf,uint32 i,uint32 l);
extern float scnsBuffer32GetFloat24(const uint32*buf,uint32 i,uint32 l);
extern float scnsBuffer32GetFloat(const uint32*buf,uint32 i,uint32 l);
extern double scnsBuffer32GetDouble(const uint32*buf,uint32 i,uint32 l);
#endif
#endif
